<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <jsp:include page="/resources/inc/head.jsp" />
</head>
<body>
<form class="layui-form layui-form-pane" id="_form" method="post" action="${basePath}/oa/hr/personalRecords/export">
    <input type='hidden' name='param' id="param">
    <div class="layui-form-item">
        <label class="layui-form-label">请选择导出项</label>
        <div class="layui-input-block">
            <input type="checkbox" name="realname" title="姓名" value="姓名" checked>
            <input type="checkbox" name="jobNumber" title="工号" value="工号" checked>
            <input type="checkbox" name="organizationName" title="部门名称" value="部门名称" checked>
            <input type="checkbox" name="positionName" title="岗位名称" value="岗位名称" checked>
            <input type="checkbox" name="idcard" title="身份证" value="身份证" checked>
            <input type="checkbox" name="birthday" title="出生日期" value="出生日期" checked>
            <input type="checkbox" name="gender" title="性别" value="性别" checked>
            <input type="checkbox" name="phone" title="电话号码" value="电话号码" checked>
            <input type="checkbox" name="education" title="最高学历" value="最高学历" checked>
            <input type="checkbox" name="educationType" title="学历类型" value="学历类型" checked>
            <input type="checkbox" name="university" title="毕业院校" value="毕业院校" checked>
            <input type="checkbox" name="professional" title="所学专业" value="所学专业" checked>
            <input type="checkbox" name="political" title="政治面貌" value="政治面貌" checked>
            <input type="checkbox" name="inservice" title="是否在职" value="是否在职" checked>
            <input type="checkbox" name="graduationTime" title="毕业时间" value="毕业时间" checked>
            <input type="checkbox" name="joinedTime" title="入职时间" value="入职时间" checked>
            <input type="checkbox" name="positiveTime" title="转正日期" value="转正日期" checked>
            <input type="checkbox" name="signed" title="是否签订合同" value="是否签订合同" checked>
            <input type="checkbox" name="signedTime" title="签订合同时间" value="签订合同时间" checked>
            <input type="checkbox" name="desertTime" title="离职日期" value="离职日期" checked>
            <input type="checkbox" name="workage" title="工龄" value="工龄" checked>
            <input type="checkbox" name="probation" title="是否见习" value="是否见习" checked>
            <input type="checkbox" name="startProbationTime" title="见习开始时间" value="见习开始时间" checked>
            <input type="checkbox" name="endProbationTime" title="见习结束时间" value="见习结束时间" checked>
            <input type="checkbox" name="channel" title="招聘渠道" value="招聘渠道" checked>
            <input type="checkbox" name="parttime" title="是否兼职" value="是否兼职" checked>
            <input type="checkbox" name="parttimeType" title="减值类型" value="减值类型" checked>
            <input type="checkbox" name="archiveNo" title="档案编号" value="档案编号" checked>
            <input type="checkbox" name="remarks" title="备注" value="备注" checked>
            <input type="checkbox" name="ctime" title="创建时间" value="创建时间" checked>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="button" onclick="doExport()">导出</button>
        </div>
    </div>
</form>
<jsp:include page="/resources/inc/footer.jsp" />
<script>
    var index = parent.layer.getFrameIndex(window.name);
    var searchParams = ${searchParams};
    function doExport() {
        var checkedInputs = $("input:checked");
        var entities = [];
        if (checkedInputs.length < 2) {
            layer.msg("至少导出两个字段！");
            return;
        }
        checkedInputs.each(function (index, input) {
            entities.push({name: $(input).attr("name"), showName: $(input).attr("title")});
        });
        var data = JSON.stringify({entities: entities, searchParams: searchParams});
        $("#param").val(data);
        $("#_form").submit();
    }
</script>
</body>
</html>
